﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class test2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string s = TextBox1.Text.ToString();
        int a = Func.Fibonacci(int.Parse(s));
        Response.Write("所求项的值为"+a );
    }
}
public class Func
{
    public static int Fibonacci(int n)
    {
        int[] a=new int[200];
        a[0] = a[1] = 1;
        if(n>2)
        for (int i = 2; i < n; i++)
            a[i] = a[i - 1] + a[i - 2];
        return a[n-1];
        

    }



}
